<template>
	<div id="sub-container"></div>
</template>

<script>
import { start } from 'qiankun';
import { registerApps } from '@/utils/qiankun';
import { userState } from '@/store/module/user';

export default {
	mounted() {
		const store = userState();
		const { subApps } = store;
		if (!window.qiankunStarted) {
			window.qiankunStarted = true;
			registerApps(subApps);
			start({
				sandbox: {
					experimentalStyleIsolation: true // 样式隔离
				}
			});
		}
	}
};
</script>
